#include<iostream>
#include<cmath>
using namespace std;
int main(){
    double r1,p1,r2,p2;
    cin>>r1>>p1>>r2>>p2;
    double a=r1*r2*(cos(p1)*cos(p2)-sin(p1)*sin(p2));
    double b=r1*r2*(cos(p1)*sin(p2)+cos(p2)*sin(p1));
    if(a<0&&a>-0.005) printf("0.00");
    else printf("%.2lf",a);
    if(b>=0) printf("+%.2lfi",b);
    else if(b<0&&b>-0.005) printf("+0.00i");
    else printf("%.2lfi",b);
    return 0;
}
